package com.sq.partner.manager.dao.impl;

import java.util.Map;

import org.springframework.stereotype.Repository;

import com.sq.partner.manager.dao.FacadeAppApplicantDao;
import com.sq.partner.manager.mybatis.model.FacadeAppApplicant;

/**
 * 投保人Dao实现类
 * 
 * @author zhouxiuxiu
 *
 */
@Repository
public class FacadeAppApplicantDaoImpl extends BaseDaoImpl implements
        FacadeAppApplicantDao {

    /**
     * 插入投保人信息表
     * 
     * @param facadeAppApplicant
     */
    @Override
    public void insertFacadeAppApplicant(FacadeAppApplicant facadeAppApplicant)
            throws Exception {
        this.add("insertFacadeAppApplicant", facadeAppApplicant);
    }

    /**
     * 更新投保人信息表
     * 
     * @param facadeAppApplicant
     */
    @Override
    public void updateFacadeAppApplicantNotNull(
            FacadeAppApplicant facadeAppApplicant) throws Exception {
        this.update("updateFacadeAppApplicantNotNull", facadeAppApplicant);
    }

    /**
     * 得到一个新的投保人编码
     * 
     * @return
     * @throws Exception
     */
    @Override
    public String queryNewTbrClientNo() throws Exception {
        return (String) this.query("queryNewTbrClientNo", "TBR");
    }

    /**
     * 查询投保人信息
     * 
     * @param map
     * @return
     * @throws Exception
     */
    @Override
    public FacadeAppApplicant selectFacadeAppApplicantByMap(
            Map<String, String> map) throws Exception {
        return (FacadeAppApplicant) this.query("queryFacadeAppApplicantByMap",
                map);
    }
    @Override
    public void deleteAppApplicantByAppno(String appNo) throws Exception {
        this.delete("deleteAppApplicantByAppno", appNo);
    }
}
